package com.handa.common.exception;

import java.util.Objects;


public final class ServiceException extends RuntimeException {
    private final String message;

    public ServiceException() {
        this.message = "";
    }

    public ServiceException(String message) {
        this.message = message;
    }

    public ServiceException(Throwable cause) {
        super(cause);
        this.message = "";
    }

    @Override
    public String getMessage() {
        if (Objects.isNull(message)) {
            return super.getMessage();
        }

        return message;
    }

}
